package com.dms.modules.product.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

@Data
@ApiModel("购物车商品项")
public class CartItemDTO {

    @NotNull(message = "商品ID不能为空")
    @ApiModelProperty("商品ID")
    private Long productId;

    @ApiModelProperty("SKU ID，如果商品没有SKU则为空")
    private Long skuId;

    @NotNull(message = "数量不能为空")
    @Min(value = 1, message = "数量必须大于0")
    @ApiModelProperty("购买数量")
    private Integer quantity;

    @ApiModelProperty("是否选中")
    private Boolean selected = true;
} 